package com.m3958.firstgwt.client.place;

import com.m3958.firstgwt.client.MyPlace;
import com.m3958.firstgwt.client.types.ViewNameEnum;

public class VoteEditPlace extends MyPlace{
	
	private String parentId;
	
	private String voteId;
	
	
	public VoteEditPlace(String parendAndSectionId){
		String[] ss = parendAndSectionId.split(",");
		this.parentId = ss[0];
		if(ss.length > 1)this.voteId = ss[1];
	}
	
	public VoteEditPlace(String parentId,String voteId){
		this.parentId = parentId;
		this.voteId = voteId;
	}

	public String getParentId() {
		return parentId;
	}

	public void setParentId(String parentId) {
		this.parentId = parentId;
	}

	@Override
	public String getToken() {
		return ViewNameEnum.VOTE_EDIT.toString().toLowerCase() + "/" + parentId + "," + voteId;
	}

	public void setVoteId(String voteId) {
		this.voteId = voteId;
	}

	public String getVoteId() {
		return voteId;
	}

}
